package com.ouc.openplatform.zykt.orderManage.service.impl;
import java.util.List;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ouc.openplatform.pojo.EUDataGridResult;
import com.ouc.openplatform.zykt.orderManage.dao.DD_TestItem_DetailDao;
import com.ouc.openplatform.zykt.orderManage.model.DD_TestItem_Detail;
import com.ouc.openplatform.zykt.orderManage.service.DD_TestItem_DetailService;
public class DD_TestItem_DetailServiceImpl implements DD_TestItem_DetailService{

	private DD_TestItem_DetailDao testItem_DetailDao;
	
	public DD_TestItem_DetailDao getTestItem_DetailDao() {
		return testItem_DetailDao;
	}

	public void setTestItem_DetailDao(DD_TestItem_DetailDao testItem_DetailDao) {
		this.testItem_DetailDao = testItem_DetailDao;
	}

	@Override
	public int insertSelective(DD_TestItem_Detail record) {
		return testItem_DetailDao.insertSelective(record);
	}

	@Override
	public List<String> findAllTestItem() {
		return testItem_DetailDao.findAllTestItem();
	}
	//根据检验项名称查询所有的审核条目-----sxl
	@Override
	public List<DD_TestItem_Detail> findAllDetailByCondition(String  itemName) {
		return testItem_DetailDao.findAllDetailByCondition(itemName);
		 
	}

	@Override
	public EUDataGridResult findDetailBySpecialNo(String specialNumber,int page,int rows) {
		if(0==page){
			page=1;rows=10;
		}
		//分页处理
		PageHelper.startPage(page, rows);
		List<DD_TestItem_Detail> testItem_DetailList = testItem_DetailDao.findDetailBySpecialNo(specialNumber);
		//创建一个返回值对象
		EUDataGridResult result = new EUDataGridResult();
		result.setRows(testItem_DetailList);
		//取记录总条数
		PageInfo<DD_TestItem_Detail> pageInfo = new PageInfo<DD_TestItem_Detail>(testItem_DetailList);
		result.setTotal(pageInfo.getTotal());
		return result;
	}
    

}
